window.onload = function () {
  var isStyle = true;
  document.querySelector("div").addEventListener("click", function () {
    if (isStyle) {
      this.style.background = "yellow";
      this.style.color = "pink";
    }
    if (!isStyle) {
      this.style.background = "pink";
      this.style.color = "yellow";
    }
    isStyle = !isStyle;
  });
};
